/*
 * @Author: hongbin
 * @Date: 2023-05-26 22:40:02
 * @LastEditors: hongbin
 * @LastEditTime: 2023-06-13 11:27:37
 * @Description:
 */
import { ShaderMaterial } from "three/src/materials/ShaderMaterial";
import vertexShader from "./vt.glsl";
import fragmentShader from "./fm.glsl";
import { TextureLoader } from "three";

export class UseTaiJIPictureMaterial extends ShaderMaterial {
    load = () => {};

    constructor() {
        const uniforms = {
            diffTexture: {
                value: new TextureLoader().load("/textures/taiji.jpg", () => {
                    this.load();
                }),
            },
        };

        super({
            vertexShader,
            fragmentShader,
            uniforms,
        });
    }
}
